add ssh identity configuration#687
Conversation
✅ Deploy Preview for jumpstarter-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
WalkthroughAdds SSH identity support. Driver accepts ssh_identity or ssh_identity_file (mutually exclusive), can read file content, and exposes get_ssh_identity. Client accepts ssh_identity, writes a temporary key file with 0600 permissions, injects -i into SSH args, preserves default username logic, executes SSH, and cleans up the temp file. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Caller
participant D as SSHWrapper (driver.py)
participant CL as Client (client.py)
participant OS as OS/FS
C->>D: Configure ssh_identity or ssh_identity_file
alt ssh_identity_file provided
D->>OS: Read ssh_identity_file
OS-->>D: Identity contents or error
D->>D: Validate mutual exclusivity
else ssh_identity provided
D->>D: Validate mutual exclusivity
end
C->>D: get_ssh_identity()
D-->>C: ssh_identity (string or None)
C->>CL: _run_ssh_local(..., ssh_identity, args)
opt ssh_identity provided
CL->>OS: Create temp file with 0600 perms
CL->>CL: identity_file = temp path
end
CL->>CL: _build_ssh_command_args(..., identity_file, args)
note over CL: Include -i identity_file if set<br/>Inject -l default_username if not explicitly provided
CL->>OS: Execute SSH command
alt success or failure
OS-->>CL: Exit status / output
end
CL->>OS: Cleanup temp identity file
OS-->>CL: Deleted or warn on failure
CL-->>C: Result
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
specify identity to use with ssh_identity_file or directly using ssh_identity string Temporary file with that content will be created on the client side and passed to ssh -i option
be9de1f to
67ff077
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/jumpstarter-driver-ssh/jumpstarter_driver_ssh/client.py(4 hunks)packages/jumpstarter-driver-ssh/jumpstarter_driver_ssh/driver.py(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/jumpstarter-driver-ssh/jumpstarter_driver_ssh/client.py (1)
packages/jumpstarter/jumpstarter/client/base.py (1)
call(36-46)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: Redirect rules - jumpstarter-docs
- GitHub Check: Header rules - jumpstarter-docs
- GitHub Check: Pages changed - jumpstarter-docs
- GitHub Check: build
- GitHub Check: pytest-matrix (macos-15, 3.11)
- GitHub Check: pytest-matrix (ubuntu-24.04, 3.13)
- GitHub Check: pytest-matrix (macos-15, 3.13)
- GitHub Check: e2e
- GitHub Check: pytest-matrix (ubuntu-24.04, 3.11)
- GitHub Check: pytest-matrix (ubuntu-24.04, 3.12)
|
Successfully created backport PR for |
specify identity to use with ssh_identity_file or directly using ssh_identity string Temporary file with taht content will be created on the client side and passed to ssh -i option
Summary by CodeRabbit
New Features
Bug Fixes